<template>
    <div class="message-detail">
        <div style="margin-bottom: .2rem;">{{detail.gmtCreated}}</div>
        <div class="content" style="font-weight: 500;">{{detail.content}}</div>
    </div>
</template>
<script>
    import format from 'date-fns/format';
    import { messageDetail } from "../constants/api";
    import https from "../https";
    export default {
        components: {
        },
        data() {
            return {
                id: '',
                detail: {}
            }
        },
        mounted() {
            this.id = this.$route.query.id;
            this.getDetail(this.id)
        },
        methods: {
            async getDetail(id) {
                const json = await https.fetchPost(messageDetail+"?id="+id, {})
                if (json.data.code === 200) {
                    this.detail = json.data.data.bussData;
                }
            }
        }
    };
</script>
<style lang="scss" scoped>
    .message-detail {
        margin-top: .2rem;
        padding: 0 .3rem;
    }
</style>

